﻿@model JaxDug.Areas.CodeCamp.Models.Registration

@{
    ViewBag.Title = "Index";
    //Layout = "~/Views/Shared/_Layout.cshtml";
}

@section Bottom {

    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

}

<br />

@if (ViewBag.AlreadyRegistered != null && ViewBag.AlreadyRegistered == false)
{
<h3>You are not registered yet.</h3>
    
    using (Html.BeginForm()) {
        @Html.ValidationSummary(true)
        <fieldset>
            <legend>Speaker Registration</legend>

            <div class="editor-label">
                @Html.LabelFor(model => model.FirstName)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.FirstName)
                @Html.ValidationMessageFor(model => model.FirstName)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.LastName)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.LastName)
                @Html.ValidationMessageFor(model => model.LastName)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.CompanyName)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.CompanyName)
                @Html.ValidationMessageFor(model => model.CompanyName)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.Phone)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Phone)
                @Html.ValidationMessageFor(model => model.Phone)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.ShirtSizeID)
            </div>
            <div class="editor-field">
                @Html.DropDownListFor(m => m.ShirtSizeID, new List<SelectListItem>() { 
                    new SelectListItem() { Text = "Small", Value = "0" },
                    new SelectListItem() { Text = "Medium", Value = "1" },
                    new SelectListItem() { Text = "Large", Value = "2" },
                    new SelectListItem() { Text = "XL", Value = "3" },
                    new SelectListItem() { Text = "XXL", Value = "4" },
                    new SelectListItem() { Text = "XXXL", Value = "5" }
           })
                @Html.ValidationMessageFor(model => model.ShirtSizeID)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.Bio)
            </div>
            <div class="editor-field">
                @Html.TextAreaFor(model => model.Bio, new { style="width: 400px" })
                @Html.ValidationMessageFor(model => model.Bio)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.URI)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.URI)
                @Html.ValidationMessageFor(model => model.URI)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.LinkedIN)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.LinkedIN)
                @Html.ValidationMessageFor(model => model.LinkedIN)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.Twitter)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Twitter)
                @Html.ValidationMessageFor(model => model.Twitter)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.MVP)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.MVP)
                @Html.ValidationMessageFor(model => model.MVP)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.Microsoft)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Microsoft)
                @Html.ValidationMessageFor(model => model.Microsoft)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.Vegetarian)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Vegetarian)
                @Html.ValidationMessageFor(model => model.Vegetarian)
            </div>

            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>
    }

} else {
 
    <h3>You are already registered.</h3>
    <p>
    Would you like to Submit a presentation. @Html.ActionLink("Click here","Submit", "Presentation") to submit a presentation.

    </p>
}

<div>
    @Html.ActionLink("Back", "Index", "CodeCamp")
</div>
